package com.itheima.entry;

import com.itheima.controller.IStudentController;
import com.itheima.controller.ITeacherController;
import com.itheima.factory.Factory;

import java.util.Scanner;

/*
系统的入口
 */
public class SystemEntry {

    //main方法
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        loop:while (true){
            System.out.println("--------欢迎来到黑马信息管理系统--------");
            System.out.println("请输入您的选择: 1.学生管理  2.老师管理  3.退出");
            String choice = sc.nextLine();
            switch (choice){
                case "1":
                    IStudentController studentController= Factory.getStudentController();
                    studentController.start();
                    break;
                case "2":
                    ITeacherController teacherController=Factory.getTeacherController();
                    teacherController.start();
                    break;
                case "3":
                    System.out.println("再见");
                    return;
                default:
                    System.out.println("输入有误");
                    break;
            }
        }

    }
}
